package com.xiaoge.springmybatis;

import com.xiaoge.springmybatis.mapper.UserMapper;
import com.xiaoge.springmybatis.service.UserService;
import org.springframework.context.annotation.AnnotationConfigApplicationContext;

/**
 * TODO
 *
 * @author <a href="mailto:1330137071@qq.com">Zhang Xiao</a>
 * @since
 */
public class SpringIntegrationMybatisMain {
	public static void main(String[] args) {

		// 创建 ApplicationContext 容器
		AnnotationConfigApplicationContext applicationContext = new AnnotationConfigApplicationContext(AppConfig.class);
		UserService userService = applicationContext.getBean(UserService.class);
		userService.test();

		System.out.println(applicationContext.getBean("userMapper"));

	}
}